<%@ page import="pojo.AirQualityIndex" %>
<%@ page import="service.BaoDaoservice" %>
<%@ page import="impl.BaoDaoserviceImpl" %>
<%@ page import="java.util.List" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
<style>
    .manage {
        font-size: 22px;
        top: 50%;
        text-align: center;
        margin: auto;
    }

    .form1 {
        font-size: 22px;
        top: 50%;
        text-align: center;
        margin: auto;
    }
</style>
<div class="manage">

    <%
        AirQualityIndex air = new AirQualityIndex();
       int num = Integer.parseInt(request.getParameter("id"));
        System.out.println(num);
        BaoDaoservice aq =  new BaoDaoserviceImpl();
        air.setId(num);
        List<AirQualityIndex> list =aq.selecById(num);
        for(AirQualityIndex user1:list){%>
    <form  action="/upDateServlet?id=<%=num%>" method="post">
        <table class="form1">
            <h1>空气质量信息维护页面</h1>
            监测区域:<select name="quyu">
            <option value="<%=user1.getDistrictId()%>" selected><%=user1.getDistrictId()%></option>
            <option>西城区</option>
            <option>东城区</option>
            <option>海淀区</option>
            <option>丰台区</option>
        </select>
            <tr>
                <td class="text">监测日期:</td>
                <td><input class="text" type="text" name="monitorTime"  value="<%=user1.getMonitorTime()%>" /><span id="sp"></span></td>
            </tr>
            <tr>
                <td class="text">PM10值:</td>
                <td><input type="text" class="text" name="pm10" value="<%=user1.getPm10()%>" /></td>
            </tr>
            <tr>
                <td class="text">PM2.5值:</td>
                <td><input class="text" type="text" name="pm25" value="<%=user1.getPm25()%>"/><span></span></td>
            </tr>
            <tr>
                <td class="text">监测站:</td>
                <td><input class="text" type="text" name="monitoringStation" value="<%=user1.getMonitoringStation()%>" /><span></span></td>
            </tr>
            <td>最后更新时间：<%=user1.getLastModifyTime()%></td>
            <td></td>  <td></td>

            </br>
            <td><label class="ui-green">
                <input type="submit" name="submit" id="sub"   value="更新" />
                <a href="/dealServlet?id=<%=num%>"> <input type="button" name="submit1" value="删除" /></a>
                <a href="index.jsp"> <input type="button" name="submit2" value="返回" /></a>
            </label></td>

            </tr>


        </table>
    </form>
    <%
        }
    %>
</div>
</div>
</body>
</html>

